<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>叶琪32</title>
    <script>
        var grade=69;
        alert(grade/10);//7.1
        // /不表示整除
        // alert( Math.ceil(grade/10));//8 想上取整，取大于参数的最小整数
        // alert(Math.floor(grade/10));//7 向下取整，取小于参数的最大整数
        // alert( Math.round(grade/10));//四舍五入

        if(grade<0||grade>100){
            alert("成绩异常");
        }else{
            switch(Math.floor(grade/10)){
            case 9:console.log("优秀");break;
            case 8:console.log("良好");break;
            case 7:console.log("一般");break;
            case 6:console.log("及格");break;
            default:console.log("不及格");
        }
        }

      
    </script>
</head>
<body>
    
</body>
</html>